class MyCard extends egret.Shape{
    public constructor(){
        super();
        this.addEventListener(egret.Event.ADDED_TO_STAGE,this.drawCard,this);
    }

    private drawCard(){
        this.graphics.beginFill(0x0000FF);
        this.graphics.drawRect(0,0,50,50);
        this.graphics.drawRect(50,50,50,50);
        this.graphics.beginFill(0x00ff00);
        this.graphics.drawRect(50,0,50,50);
        this.graphics.drawRect(0,50,50,50);
        this.graphics.endFill();
    }
}